package services

import "Sales_system/Dao"

func Getallfactory() (error,[]Dao.Factory, int64){
	err, factoryData, total := Dao.Getallfactory()
	return err, factoryData, total
}

func Deletefactory(id string) error {
	err := Dao.DeleteFactory(id)
	return err
}

func Updatefactory(factory Dao.Factory) error  {
	err := Dao.UpdateFactory(factory)
	return err
}

func Addfactory(factory Dao.Factory) error {
	err := Dao.AddFactory(factory)
	return err
}